var x = 10

function a() {
    var y = 20

    function b() {
        console.log(x, y)
    }

    b()
    console.dir(b)
}

a()
let arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]
arr.forEach(function (item) {
    console.log(item)
})
arr.push(3)
// 从数组的开头移除第一个元素
arr.shift()
//从第i个索引删除k个元素
arr.splice(5, 2)
let str = arr.join(',')
console.log(str)
console.log(arr.map(function (i) {
    return i * 2
}))
arr.filter(i => i > 5)
